mpic++ -o main main.cpp
d="data/data_cache.txt"
if [ $? -eq 0 ]; then
  arr=(1 2 4 8 16)
  :>$d
  for i in ${arr[*]}
  do
      for cnt in {0..9}
      do
        s=$(mpiexec -np $i ./main 1000000 | tail -n 2)
        echo $s
        echo $s >> $d
      done
  done
else
  echo "failed"
fi